package com.esri.core.internal.value;

import java.util.ArrayList;
import java.util.List;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;

/* loaded from: classes.dex */
public class b {
    private String a;
    private List<KMLFeatureInfo> b;
    private int c;
    private String d;
    private int e;
    private String f;
    private int[] g;
    private int[] h;
    private boolean i;

    b() {
    }

    public String a() {
        return this.a;
    }

    public List<KMLFeatureInfo> b() {
        return this.b;
    }

    public int c() {
        return this.c;
    }

    public String d() {
        return this.d;
    }

    public int e() {
        return this.e;
    }

    public String f() {
        return this.f;
    }

    public int[] g() {
        return this.g;
    }

    public boolean h() {
        return this.i;
    }

    public void a(boolean z) {
        this.i = z;
    }

    public static b a(JsonParser jsonParser) throws Exception {
        if (com.esri.core.internal.util.d.c(jsonParser)) {
            b bVar = new b();
            while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
                String currentName = jsonParser.getCurrentName();
                jsonParser.nextToken();
                if ("description".equals(currentName)) {
                    bVar.a = jsonParser.getText();
                } else if ("featureInfos".equals(currentName)) {
                    bVar.b = new ArrayList();
                    if (jsonParser.getCurrentToken() == JsonToken.START_ARRAY) {
                        while (jsonParser.nextToken() != JsonToken.END_ARRAY) {
                            bVar.b.add(KMLFeatureInfo.a(jsonParser));
                        }
                    } else {
                        jsonParser.skipChildren();
                    }
                } else if ("id".equals(currentName)) {
                    bVar.c = jsonParser.getIntValue();
                } else if ("parentFolderId".equals(currentName)) {
                    bVar.e = jsonParser.getIntValue();
                } else if ("snippet".equals(currentName)) {
                    bVar.f = jsonParser.getText();
                } else {
                    if ("subFolderIds".equals(currentName)) {
                        if (jsonParser.getCurrentToken() == JsonToken.START_ARRAY) {
                            ArrayList arrayList = new ArrayList();
                            while (jsonParser.nextToken() != JsonToken.END_ARRAY) {
                                arrayList.add(Integer.valueOf(jsonParser.getIntValue()));
                            }
                            if (arrayList.size() > 0) {
                                bVar.g = new int[arrayList.size()];
                                for (int i = 0; i < arrayList.size(); i++) {
                                    bVar.g[i] = ((Integer) arrayList.get(i)).intValue();
                                }
                            }
                        } else {
                            jsonParser.skipChildren();
                        }
                    } else if ("networklLinkIds".equals(currentName)) {
                        if (jsonParser.getCurrentToken() == JsonToken.START_ARRAY) {
                            ArrayList arrayList2 = new ArrayList();
                            while (jsonParser.nextToken() != JsonToken.END_ARRAY) {
                                arrayList2.add(Integer.valueOf(jsonParser.getIntValue()));
                            }
                            if (arrayList2.size() > 0) {
                                bVar.h = new int[arrayList2.size()];
                                for (int i2 = 0; i2 < arrayList2.size(); i2++) {
                                    bVar.h[i2] = ((Integer) arrayList2.get(i2)).intValue();
                                }
                            }
                        } else {
                            jsonParser.skipChildren();
                        }
                    } else if ("name".equals(currentName)) {
                        bVar.d = jsonParser.getText();
                    } else if ("visibility".equals(currentName)) {
                        bVar.i = jsonParser.getIntValue() > 0;
                    } else {
                        jsonParser.skipChildren();
                    }
                }
            }
            return bVar;
        }
        return null;
    }
}
